<?PHP 
$userid = isset($_COOKIE["gwt_userid"]) ? $_COOKIE["gwt_userid"] : "";
$zfb = isset($_COOKIE["gwt_zfb"]) ? $_COOKIE["gwt_zfb"] : "";
$phone = isset($_COOKIE["gwt_phone"]) ? $_COOKIE["gwt_phone"] : "";
$email = isset($_COOKIE["gwt_email"]) ? $_COOKIE["gwt_email"] : "";
?>

<?PHP
include("../new/mall/common/connect.php");
include("../public/common.php");
$q = trim(CheckUrlParamNoDie("q"));
$catid = CheckUrlParamNoDie("catid");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新建标签页</title>
<link type="text/css" rel="stylesheet" href="../new/css/topss.css" />
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body bgColor="transparent">
<div class="overlay">
    <div class="frame">
        <div class="mall-ti"><h2>百家商城</h2></div>
        <div class="mall-a">
            <ul>
                <li <?php if ($catid == "") echo "class='ac'"; ?>><a href="malllist.php">推荐商家</a></li>
            <?PHP 
                $res = mysql_query( "select typename,typecode from duoduo_malltype where sort > 0 order by sort" );
                while( $res && $row = mysql_fetch_assoc( $res ))
                { 
                    echo "<li ";
                    if ($catid == $row["typecode"]) echo "class='ac'";
                    echo "><a href='malllist.php?catid=".$row["typecode"]."'>".$row["typename"]."</a></li>";
                }
            ?>
            </ul>
        </div>
        <div class="mall-list">
            <ul>
            <?PHP
            if ($catid == "")
                $res = mysql_query( "select * from duoduo_mall where recommend_order > 0 and sort > 0 order by recommend_order limit 12" );
            else
                $res = mysql_query( "select * from duoduo_mall where catid like '%".$catid.",%' and sort > 0 order by sort desc limit 12" );
            while( $res && $row = mysql_fetch_assoc( $res ))
            {
            ?>

                <li>
                    <div class="malllogo"><img width="100" height="45" src="http://www.gouwutu.com/new/mall/upload/<?PHP echo $row["logo"] ?>" alt="<?PHP echo $row["name"] ?>"></div>
                    <div class="mallname"><?PHP echo $row["name"] ?></div>
                    <div class="mallfan">最高返：<font style="font-weight:bold; color:#FF0000"><?PHP echo $row["fan"] ?></font></div>
                    <a target="_blank" href="http://www.gouwutu.com/new/mall/mall.php?id=<?PHP echo $row["id"] ?>" title="<?PHP echo $row["name"] ?>"></a>
                </li>
            <?php
            }
             ?>
            </ul>
        </div>
    </div>
</div>
</body>
</html>
